import React from 'react';
import { Layout } from 'antd';
import MyNav from './nav'
import { withRouter } from 'react-router-dom';

let MyNav2 = withRouter(MyNav)

const { Sider } = Layout;
class MySlider extends React.Component {
  state = {
    collapsed: false,
  }
  onCollapse = collapsed => {
    console.log(collapsed);
    this.setState({ collapsed });
  };
  render() {
    const { collapsed } = this.state;
    return <Sider className='my_slider_box'
      collapsible
      onCollapse={this.onCollapse}
      collapsed={collapsed}>
      <h1>这时导航头部</h1>
      <MyNav2 />
    </Sider>;
  }
}
export default MySlider